<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * SiteAboutTranslations.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class SiteAboutTranslations extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('site_about_translations', function (Blueprint $table) {
            $table->bigIncrements('id');//BigID unsigned
            $table->bigInteger('about_id')->unsigned();//介绍ID
            $table->string('locale',16)->index();//语言标识符
            $table->string('title')->default('');
            $table->string('summary')->default('');
            $table->text('content')->default('');

            // 注意时间戳位数
            $table->timestamps();

            // index
            $table->index('about_id');
            $table->unique(['about_id','locale']);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('site_about_translations');
    }
}